﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <Header>
    <Title>DisposeService</Title>
    <Author>jinlei</Author>
    <Shortcut>DisposeService</Shortcut>
    <Description>DisposeService</Description>
    <SnippetTypes>
      <SnippetType>SurroundsWith</SnippetType>
      <SnippetType>Expansion</SnippetType>
    </SnippetTypes>
  </Header>
  <Snippet>
    <Declarations>
      <Literal>
        <ID>DisposeService</ID>
        <Default>DisposeService</Default>
      </Literal>
    </Declarations>
    <Code Language="XML">
      <![CDATA[#region 释放资源

        private bool _disposing = false;
        private bool _disposed = false;
        public void Dispose()
        {
            if (_disposed || _disposing)
                return;
            _disposing = true;
            //TODO:
            
            _disposing = false;
            _disposed = true;
        }

        #endregion]]>
    </Code>
  </Snippet>
</CodeSnippet>